export default function ajax(url, data = {}, type = 'GET') {
	//console.log(url,data)
	return new Promise(function(resolve, reject) {
		uni.request({
			method: type,
			url: url,
			sslVerify:false,
			data: data
		}).then(function(response) {
			var [e, res] = response;
			if(e){
				resolve({code:10000});
				return;
			}
			//console.log('///////////////',url)
			//console.log('res====',res)
			resolve(res.data);
		})
		
	})
}
